# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-colorama
_pkgname=colorama
pkgver=0.4.3
pkgrel=0
pkgdesc="Simple cross-platform colored terminal text"
options="!check" # 2 Tests fail on drone-ci
url="https://pypi.python.org/pypi/colorama"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-mock"
source="$pkgname-$pkgver.tar.gz::https://github.com/tartley/colorama/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

replaces=py-colorama # Backwards compatibility
provides=py-colorama=$pkgver-r$pkgrel # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 -m unittest discover -p *_test.py
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="ab41a2f95fe75de0b280c174c6166b86645e5cc675dcedf784fe15170aae630e831370527c9490342b77c7d088a023a48428a519b52ad1c70be58904742a94c8  py3-colorama-0.4.3.tar.gz"
